Skip to content

Add support for Model Context Protocol#91

Merged
martin-fleck-at merged 1 commit into
masterfrom
issues/1546
May 19, 2026
Merged

Add support for Model Context Protocol#91
martin-fleck-at merged 1 commit into
masterfrom
issues/1546

Conversation

@martin-fleck-at
Copy link
Copy Markdown
Contributor

What it does

Bridges the GLSP-announced MCP server into the IDE's built-in MCP definition provider API, surfacing the URL in the IDE's MCP server list.

MCP integration

  • Node-side provider registers the announced endpoint on startup and deregisters on extension dispose.
  • Plumbs an opt-in MCP server configuration through the connector base classes.
  • Raises the minimum supported IDE version to the release shipping the MCP definition provider API.

Adopters

  • Enable MCP by setting the configuration on the connector.
  • The workflow example demonstrates the end-to-end wiring with a transient connect notification and a copy-URL action.

Misc

  • Webview content-security policy allows blob URLs as image sources, enabling client-side PNG export inside the webview.
  • Adapts the webview shutdown bridge to the widened asynchronous shutdown contract.

Part of eclipse-glsp/glsp#1546
Requires eclipse-glsp/glsp-client#456 and eclipse-glsp/glsp-server-node#120

How to test

  • Nothing should break in the default case
  • To use the new mcp server, you need to use a GLSP server that supports it, i.e., the Add support for Model Context Protocol glsp-server-node#120
  • Startup the Workflow example
  • If you have Co-Pilot the MCP server is registered automatically and you may need to enable it in your chat settings for that agent.

Follow-ups

Changelog

  • This PR should be mentioned in the changelog
  • This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)

applicationId: ApplicationIdProvider.get(),
protocolVersion: GLSPClient.protocolVersion
protocolVersion: GLSPClient.protocolVersion,
...(this.options.mcpServer ? { mcpServer: this.options.mcpServer } : {})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use

mcpServer: this.options.mcpServer ?? {} ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we do not want to set mcpServer if it is not configured. Just setting the property is the opt-in for us to start the MCP server with default configuration.

Bridges the GLSP-announced MCP server into the IDE's built-in MCP
definition provider API, surfacing the URL in the IDE's MCP server
list.

MCP integration
- Node-side provider registers the announced endpoint on startup
  and deregisters on extension dispose.
- Plumbs an opt-in MCP server configuration through the connector
  base classes.
- Raises the minimum supported IDE version to the release shipping
  the MCP definition provider API.

Adopters
- Enable MCP by setting the configuration on the connector.
- The workflow example demonstrates the end-to-end wiring with a
  transient connect notification and a copy-URL action.

Misc
- Webview content-security policy allows blob URLs as image
  sources, enabling client-side PNG export inside the webview.
- Adapts the webview shutdown bridge to the widened asynchronous
  shutdown contract.

Part of eclipse-glsp/glsp#1546
@martin-fleck-at
Copy link
Copy Markdown
Contributor Author

@tortmayr Pushed an update to the latest server, everything should work now, please test :-)

Copy link
Copy Markdown
Contributor

@tortmayr tortmayr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍🏼

@tortmayr tortmayr self-requested a review May 19, 2026 14:51
@martin-fleck-at martin-fleck-at merged commit 66ce3e3 into master May 19, 2026
3 checks passed
@martin-fleck-at martin-fleck-at deleted the issues/1546 branch May 19, 2026 14:55
@tortmayr tortmayr mentioned this pull request Jun 1, 2026
2 tasks
This was referenced Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants